// 导入组件
import Vue from 'vue';
import Router from 'vue-router';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '登录',
        component: ()=>import('@/views/login'),
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: ()=>import('@/views/login'),
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, 
	{
		path:'/index',
		name:'首页',
		component:()=>import('@/views/index'),
		iconCls: 'el-icon-tickets',
		 children:[{
			 path: '/home/index',
			 name: '数据统计',
			 component:()=>import('@/views/home/index'),
			 meta: {
			     requireAuth: true
			 }
		 }] 
	},
	{
		path:'/index',
		name:'首页',
		component:()=>import('@/views/index'),
		iconCls: 'el-icon-tickets',
		 children:[
			 {
			 			 path: '/image/category',
			 			 name: '图片分类',
			 			 component:()=>import('@/views/image/category'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 
			 {
			 			 path: '/image/image',
			 			 name: '图片管理',
			 			 component:()=>import('@/views/image/image'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/sys/sys',
			 			 name: '配置管理',
			 			 component:()=>import('@/views/sys/sys'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/sys/banner',
			 			 name: '广告管理',
			 			 component:()=>import('@/views/sys/banner'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/house/type',
			 			 name: '房屋类型',
			 			 component:()=>import('@/views/house/type'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/house/project',
			 			 name: '楼栋表',
			 			 component:()=>import('@/views/house/project'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/house/house',
			 			 name: '房屋表',
			 			 component:()=>import('@/views/house/house'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/house/add_house',
			 			 name: '添加房屋',
			 			 component:()=>import('@/views/house/add_house'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/article/article',
			 			 name: '文章管理',
			 			 component:()=>import('@/views/article/article'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/article/add_article',
			 			 name: '添加文章',
			 			 component:()=>import('@/views/article/add_article'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/yuyue/yuyue',
			 			 name: '获取预约数据',
			 			 component:()=>import('@/views/yuyue/yuyue'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 			 path: '/user/user',
			 			 name: '用户管理',
			 			 component:()=>import('@/views/user/user'),
			 			 meta: {
			 			     requireAuth: true
			 			 }
			 },
			 {
			 	path: '/user/tx',
			 	name: '提现记录',
			 	component:()=>import('@/views/user/tx'),
			 	meta: {
					requireAuth: true
			 	}
			 },
			 {
			 	path: '/user/invite',
			 	name: '邀请记录',
			 	component:()=>import('@/views/user/invite'),
			 	meta: {
			 					requireAuth: true
			 	}
			 }
		  ] 
	}
	
	]
})